<?php
/**@var \Weline\Framework\View\Template $this */
/**@var \Weline\Backend\Block\ThemeConfig $themeConfig */
$themeConfig = \Weline\Framework\Manager\ObjectManager::getInstance(\Weline\Backend\Block\ThemeConfig::class);
?>
<!DOCTYPE html>
<!--
 *@Author       秋枫雁飞
 *@Email        aiweline@qq.com
 *@Forum        https://bbs.aiweline.com
 *@DESC         后台共用头部
-->
<html lang="en" <?= ('rtl' === $themeConfig->getThemeModel()) ? " dir=\"rtl\"" : '' ?>>
<head>
    @template(Weline_Admin::common/head.phtml)
    <!-- jvectormap -->
    <link href="@static(Weline_Admin::assets/libs/jqvmap/jqvmap.min.css)" rel="stylesheet"/>
    <title><?= __('沙盒环境管-Weline Admin 管理面板') ?></title>
</head>

<!--<body data-sidebar="dark" data-topbar='colored' data-layout='horizontal'>-->
<body <?= $themeConfig->getLayouts() ?? ''; ?>>

<!-- <body data-layout="horizontal" data-topbar="dark"> -->
<!--加载中组件 开始-->
@template(Weline_Admin::common/page/loading.phtml)
<!-- 开始 页面 -->
<div id="layout-wrapper">

    <!--页头工具条 开始-->
    <w:block class='Weline\Admin\Block\Backend\Page\Topbar'/>
    <!--页头工具条 结束-->
    <!-- ========== Topnav Start ========== -->
    <!--页头菜单栏 开始-->
    <w:block class='Weline\Admin\Block\Backend\Page\Topnav' />
    <!--页头菜单栏 结束-->

    <!-- ========== Left Sidebar Start ========== -->
    <!--左侧菜单栏 开始-->
    @template(Weline_Admin::common/left-sidebar.phtml)
    <!--左侧菜单栏 结束-->


    <!-- ============================================================== -->
    <!-- Start right Content here -->
    <!-- ============================================================== -->
    <div class="main-content">

        <div class="page-content">
            <div class="container-fluid">

                <!-- start page title -->
                <div class="row">
                    <div class="col-12">
                        <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                            <h4 class="mb-sm-0">
                                <lang>沙盒环境配置</lang>
                            </h4>

                            <div class="page-title-right">
                                <breadcrumb model='Weline\Backend\Model\Menu' order_field='order'
                                            name_field='title'></breadcrumb>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- end page title -->
                <div class="row">
                    <div class="col-xl-12 col-sm-12">
                        <div class="card">
                            <div class="card-body">
                                <lang>沙盒环境是一套数据隔离的可提供给测试人员对代码进行测试的环境，测试时数据不会写入正式数据库，而是写入沙盒数据库。</lang>
                            </div>
                            <!-- end card-body -->
                        </div>
                        <!-- end card -->
                    </div>
                    <!-- end col -->
                </div>
                <!-- end row -->
                <div class="row">
                    <div class="col-xl-12 col-sm-12">
                        <div class="card">
                            <div class="card-body">
                                <h4 class='card-title'>
                                    <lang>可配置参数：</lang>
                                </h4>
                                <p class='card-title-desc'>
                                    <lang>控制沙盒环境参数来达到测试系统环境。</lang>
                                </p>
                                <div class="row">
                                    <div class='col-md-6 col-sm-6 col-lg-3'>
                                        <h3><lang>沙盒启动Key</lang></h3>
                                        <lang>沙盒启动Key配置。使用时在请求后面加上sandbox参数。示例：</lang><br><span><url>/</url>?sandbox=<span class="text-info">{{env.sandbox_key|'当前未设置'}}</span></span>
                                        <a href="@url{'/dev/tool/sandbox/enable'}?enable=on">
                                            <lang>开启沙盒</lang>
                                        </a>
                                        <br>
                                        <lang>关闭沙盒请在Cookie中删除或者设置：w_sandbox值。</lang>
                                        <a href="@url{'/dev/tool/sandbox/close'}?close=on"><lang>关闭沙盒</lang></a>
                                        <block class='Weline\Component\Block\OffCanvas'
                                               template='Weline_Component::off-canvas.phtml'
                                               cache='0'
                                               id='sandbox'
                                               target-tag="button"
                                               target-button-class="btn btn-primary"
                                               action='*/admin/sandbox/setSandboxKey'
                                               title='配置沙盒启动Key'
                                               close-button-show='1'
                                               close-button-text='关闭'
                                               direction='right'
                                               class-names='w-25 h-100'
                                               target-button-text='配置'
                                               save="1"
                                               flush="1"
                                        />
                                    </div>
                                </div>
                            </div>
                            <!-- end card-body -->
                        </div>
                        <!-- end card -->
                    </div>
                    <!-- end col -->
                </div>
                <!-- end row -->

            </div>
            <!-- container-fluid -->
        </div>
        <!-- End Page-content -->

        <footer class="footer">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-6">
                        <script>document.write(new Date().getFullYear())</script>
                        © Weline.
                    </div>
                    <div class="col-sm-6">
                        <div class="text-sm-end d-none d-sm-block">
                            Crafted with <i class="mdi mdi-heart text-danger"></i> By <a
                                    href="https://www.aiweline.com/">秋枫雁飞(aiweline)</a>
                        </div>
                    </div>
                </div>
            </div>
        </footer>

    </div>
    <!-- end main content-->

</div>
<!-- END layout-wrapper -->

<!--右边栏-->
@template(Weline_Admin::common/right-sidebar.phtml)
<!--tinymce js-->
<script src='@static(Weline_Admin::assets/libs/tinymce/tinymce.min.js)'></script>

<!-- init js -->
<script src='@static(Weline_Admin::assets/js/pages/form-editor.init.js)'></script>
<!--页脚-->
@template(Weline_Admin::common/footer.phtml)

<!-- jquery.vectormap map -->
<script src="@static(Weline_Admin::assets/libs/jqvmap/jquery.vmap.min.js)"></script>
<script src="@static(Weline_Admin::assets/libs/jqvmap/maps/jquery.vmap.usa.js)"></script>
</body>
</html>

